package com.practice.java8中双冒号方法引用如何使用;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: tenghw-practice-demo
 * @author: tenghw
 * @create: 2024-01-06 18:29
 * @Version 1.0
 * @description:
 **/
public class Temp {
    public static void main(String[] args) {
        List<String> list=new ArrayList<String>(){{
            add("1");
            add("abc");
            add("zard");
        }};
        //list.stream().forEach(item->System.out.println(item));
        list.forEach(System.out::println);
    }
}